package com.example.demo.service;

import com.example.demo.dao.NewsDao;
import com.example.demo.polo.News;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsService {
    @Autowired
    NewsDao newsDao;
    public List<News> getAllNews(){
        return newsDao.findAll();
    }
}
